<?php
echo XHtml::beginForm('', 'post', array('enctype'=>'multipart/form-data'));
XHtml::hightlightErrorFields();
//echo XHtml::activeHiddenField($plugin,'Id');
?>
    <h3>Upload plugin</h3>
    
    <div class="Input">
        <label for="Plugin_ZipFile">Zip file (*): </label>
        <?php echo XHtml::activeFileField($plugin,'ZipFile'); ?>
    </div>

    <div class="Action">
        <?php echo XHtml::submitButton('Upload'); ?>
        <?php if ($plugin->Id > 0): ?>
        <a href="<?php echo '/'.trim(MessagingSettings::EMAIL_TEMPLATE_FOLDER , '/').'/'.$plugin->Alias.'/index.html'; ?>" target="_blank">Preview Template</a>
        <?php endif; ?>
    </div>

<?php echo XHtml::endForm();?>
<?php
$cs = Yii::app()->clientScript;
$cs->registerScriptFile(Yii::app()->theme->BaseUrl.'/scripts/common.js', CClientScript::POS_BEGIN);
?>